﻿using System;
using System.Data;
using System.Configuration;
using System.Security.Cryptography;

/// <summary>
/// Md5 的摘要说明
/// </summary>
public class Md5
{
	public Md5()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}
    public static string getMd5(string pwd)
    {
        MD5 md5 = MD5.Create();
        string result = "";
        byte[] data = md5.ComputeHash(System.Text.Encoding.Default.GetBytes(pwd));
        for (int i = 0; i < data.Length; i++)
        {
            result += data[i].ToString("x2");
        }
        return result;
    
    }
}
